package com.jiangwh.web.restful.security;

import javax.ws.rs.core.Response;

import org.springframework.security.annotation.Secured;

import com.jiangwh.domain.pojo.Customer;
import com.jiangwh.domain.pojo.Order;

public interface CustomerServiceSecured {
    
    @Secured({"ROLE_CUSTOMER", "ROLE_ADMIN" })
    Response getCustomer(String id);

    @Secured("ROLE_ADMIN")
    Response updateCustomer(Long id, Customer customer);
    
    @Secured("ROLE_ADMIN")
    Response addCustomer(Customer customer);

    @Secured("ROLE_ADMIN")
    Response deleteCustomer(String id);

    @Secured({"ROLE_CUSTOMER", "ROLE_ADMIN" })
    Order getOrder(String orderId);

}
